<script>
	$(function() {
		$( "#txtNgaythuchien" ).datepicker({dateFormat: 'dd-mm-yy'});
		$("#cboCountry").change(function() { 
		/* do something here */ 
			var ajax_url = '../incs/list_school_by_country_id.php?qg_id='+ $("#cboCountry").val();
			$.get(ajax_url,function(data){
			$('#cboSchool').html(data);
			});
		});
		$("#cboSchool").change(function() { 
		/* do something here */ 
			var ajax_url = '../incs/list_dept_by_school_id.php?truong_id='+ $("#cboSchool").val();
			$.get(ajax_url,function(data){
			$('#cboDept').html(data);
			});
		});
	});

		

</script>


<?php
if (!defined('WEB_ROOT')) {
	exit;
}

$nn_id = (isset($_GET['nn_id']) && $_GET['nn_id'] > 0) ? $_GET['nn_id'] : 0;

$topicGroupList = buildTopicGroupOptions($nn_id);
$styleSeminarList = buildStyleSeminarOptions($loaiht_id);
$deptList = buildDeptOptions($dv_id);
//$schoolList = buildSchoolOptions($truong_id);
$countryList = buildCountryOptions($qg_id);
?> 
<div class="onecolumn">
	<div class="header">
		<span>Thêm hội thảo</span>
	</div>
	<br class="clear"/>
	<div class="content">
		<form action="processSeminar.php?action=addSeminar" method="post" enctype="multipart/form-data" name="frmAddSeminar" id="frmAddSeminar">
		  <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
		  <tr> 
			   <td width="150" class="label">Mã hội thảo</td>
			   <td class="content"> <input name="txtMaht" type="text" class="box" id="txtMaht" size="20" maxlength="20"></td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Tên hội thảo</td>
			   <td class="content"> <input name="txtTenht" type="text" class="box" id="txtTenht" size="70" maxlength="70"></td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Chủ đề</td>
			   <td class="content"> <input name="txtChude" type="text" class="box" id="txtChude" size="70" maxlength="70"></td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Ngày thực hiện</td>
			   <td class="content"><input name="txtNgaythuchien" type="text" id="txtNgaythuchien" size="40" maxlength="40" class="box"> </td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Địa điểm</td>
			   <td class="content"><input name="txtDiadiem" type="text" id="txtDiadiem" size="70" maxlength="70" class="box"> </td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Quốc gia</td>
			   <td class="content"> <select name="cboCountry" id="cboCountry" class="box">
				 <option value="" selected>-- Chọn quốc gia --</option>
						<?php
							echo $countryList;
						?>	 
				</select></td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Trường</td>
			   <td class="content"> <select name="cboSchool" id="cboSchool" class="box">
				 <option value="0" selected>-- Chọn trường --</option>
						<?php
							echo $list;
						?>	 
				</select></td>
		   </tr>
		   <tr>
				 <td width="150" class="label">Đơn vị</td>
				 <td class="content"> <select name="cboDept" id="cboDept" class="box">
				   <option value="" selected>-- Chọn đơn vị --</option>
						<?php
							echo $deptList;
						?>	 
				   </select>
				 </td>
		   </tr>
		   <tr> 
			   <td width="150" class="label">Loại hội thảo</td>
			   <td class="content"> <select name="cboStyleSeminar" id="cboStyleSeminar" class="box">
					 <option value="" selected>-- Chọn loại hội thảo --</option>
						<?php
							echo $styleSeminarList;
						?>	 
					</select></td>
		  </tr>
		  <tr> 
			   <td width="150" class="label">Nhóm ngành</td>
			   <td class="content"> <select name="cboTopicGroup" id="cboTopicGroup" class="box">
				<option value="" selected>-- Chọn nhóm ngành --</option>
					<?php
						echo $topicGroupList;
					?>	 
				</select>  </td>
		  </tr>
		 </table>
		 <p align="center"> 
		  <input name="btnAddSeminar" type="button" id="btnAddSeminar" value="Thêm hội thảo" onClick="checkAddSeminarForm();" class="box">
		  &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value=" Hủy " onClick="window.location.href='index.php';" class="box">  
		 </p>
		</form>
	</div>
</div>
